#include<iostream>
using namespace std;

int a[10],b[10],nr,i;
int main()
{ int n,k,j,ok=0;
 cout<<"n=";cin>>n;
 cout<<"k=";cin>>k;

for(i=0;i<n;i++)
   { cout<<"a["<<i<<"]= ";
     cin>>a[i];
    }

for(i=0;i<n;i++)
  { k=2;
    while(k<=n/2)
     if(a[i]%k==0)
      { nr++;
        b[j]=a[i];
        k++;
	ok=1;
       }

if(ok==0)
 cout<<"vect e div cu k";
else 
cout<<"vect nou format este: ";
 for(i=0;i<j;i++)
  cout<<b[j]<<" ";
}
}
      
